<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib uri="/struts-tags" prefix="s" %>   
 <%@taglib uri="/struts-jquery-tags" prefix="sj" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/passeport-animalier/css/main.css" rel="stylesheet" type="text/css"/>
<title> <s:text name="profil"></s:text> </title>
<sj:head  jqueryui="true" jquerytheme="smoothness"/>
</head>
<body>
	<jsp:include page="../layout/navigation_bar.jsp"/>
	<jsp:include page="../layout/header.jsp"/>
	<div class="wrapper">
	  <jsp:include page="../layout/menu.jsp"/>
	  <div class="content">
	    <div class="title">
	      <h5>  <s:property value="%{personne.compte.login}"/> </h5>
	    </div>
	    <s:fielderror></s:fielderror>
	    <s:if test="hasActionErrors()">
		  <div class="nNote nFailure">
		    <p>
			  <s:actionerror/>
		    </p>
		  </div> 
 		</s:if>
 		<s:if test="hasActionMessages()">
		  <div class="nNote nSuccess"style="padding-left:47px;">
            <p> <s:actionmessage/> </p>
          </div>
 		</s:if>
		<div class="widgets">
		  <div class="left">
		    <form action="update_password" method="post" class="mainForm">
			  <fieldset>
			  <div class="widget first">
			    <div class="head">
			      <h5 class="iList"><s:text name="password.modifier"/> </h5>
			    </div>
			    <div class="rowElem">
				  <label> <s:text name="password"/> </label>
				  <div class="formRight">
				    <input name="password" type="password" value="">
				    <span class="field_error"> <s:property value="errors['password']"/> </span>
			      </div>
				  <div class="fix"></div>
			    </div>
			    <div class="rowElem">
			      <label> <s:text name="confirmation"/> </label>
				  <div class="formRight">
				    <input name="confirmePassword" type="password">
				  </div>
				  <div class="fix"></div>
			    </div>
			    <s:submit value="%{getText('form.update')}" cssClass="greyishBtn submitForm"/>
			    <div class="fix"></div>
			  </div>
			  </fieldset>
			      </form>
				  <form action="update_info" method="post" class="mainForm">
				    <fieldset>
					  <div class="widget">
					    <div class="head"><h5 class="iList"> <s:text name="update.info"/> </h5></div>
						<div class="rowElem">
						  <label> <s:text name="presonne.prenom"/> </label>
						  <div class="formRight">
						    <input name="prenom" value="${prenom}" type="text">
						    <span class="field_error"> <s:property value="errors['prenom']"/> </span>
						  </div>
						  <div class="fix"></div>
						</div>
					    <div class="rowElem">
					      <label>  <s:text name="presonne.nom"/> </label>
					      <div class="formRight">
					        <input name="nom" value="${nom}" type="text">
					        <span class="field_error"> <s:property value="errors['nom']"/> </span>
					      </div>
					      <div class="fix"></div>
					    </div>
						<div class="rowElem">
						  <label> <s:text name="presonne.email"/> </label>
						  <div class="formRight">
						    <input name="email" value="${email}" type="text">
						    <span class="field_error"> <s:property value="errors['email']"/> </span>
						  </div>
						  <div class="fix"></div>
						</div>
						<div class="rowElem">
						  <label> <s:text name="presonne.telephone"/> </label>
						  <div class="formRight">
						    <input name="telephone" value="${telephone}" type="text">
						    <span class="field_error"> <s:property value="errors['telephone']"/> </span>
						  </div>
						  <div class="fix"></div>
						</div>
						<div class="rowElem">
								<label> <s:text name="presonne.dateNaissance"/> </label>
								<div class="formRight">
								<%-- <input type="text" value="${veterinaire.dateNaissance}" name="veterinaire.dateNaissance"> --%>
								<sj:datepicker id="date0" value="dateNaissance" label="Select a Date" displayFormat="dd/mm/yy" name="dateNaissance" cssStyle="width:80%;margin-right:4px;" buttonImage="/passeport-animalier/images/icons/color/calendar-day-10.png"  />
								<span class="field_error"> <s:property value="errors['dateNaissance']"/> </span>
								</div>
								<div class="fix"></div>
						</div>	
						<s:submit value="%{getText('form.update')}" cssClass="greyishBtn submitForm"/>
						<div class="fix"></div>
					  </div>
					</fieldset>
			      </form>
			    </div>
			    <div class="right">
				  <div class="widget first">
					<div class="head"><h5 class="iFrames"> <s:text name="prseonne.image"/> </h5></div>
					  <table class="tableStatic" cellpadding="0" cellspacing="0" width="100%">
					    <tbody>
						  <tr>
						    <td> <img alt="" src="${pictureFileName}"> </td>
						  </tr>
						  <tr>
						    <td>
							  <s:form action="update_picture" enctype="multipart/form-data">
							    <s:file name="picture" />
								<s:submit value="%{getText('form.update')}" cssClass="greyishBtn submitForm"/>
							  </s:form>
							</td>
					      </tr>
						</tbody>
					  </table>
					</div>
				  </div>
				</div>
		    </div>
			</div>
	<jsp:include page="/views/layout/footer.jsp"/>
</body>
</html>